package app.models.game;

import com.github.sog.annotation.TableBind;
import com.github.sog.plugin.sqlinxml.SqlKit;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * <p>
 * .
 * </p>
 *
 * @author Jerry Ou
 * @version 1.0 2014-04-22 22:04
 * @since JDK 1.6
 */
@TableBind(tableName = "ol_gamerf_awards")
public class GamerfAwards extends Model<GamerfAwards> {

    private static final long   serialVersionUID = 1L;
    /**
     * The public dao.
     */
    public static final GamerfAwards dao = new GamerfAwards();


    public List<GamerfAwards> list(){
        return find(SqlKit.sql("gamerfawards.list"));
    }

    public void deleteByGame(int gameId) {
        Db.update(SqlKit.sql("gamerfawards.deleteByGame"), gameId);
    }

    public List<GamerfAwards> findRfByGame(String gameId) {
        return find(SqlKit.sql("gamerfawards.findRfByGame"), gameId);
    }
}